import paddle
import ppsci

x = paddle.to_tensor([[[1, 2, 3, 4], [2, 3, 5, 7], [3, 5, 8, 7], [4, 1, 2, 4]],
                      [[1, 2, 3, 4], [2, 4, 6, 8], [3, 5, 8, 7], [4, 1, 2, 4]]], stop_gradient=False)
x.stop_gradient = False
y = x * x * x
print(y)
dy_dx = ppsci.autodiff.hessian(y, x, 0)
print(dy_dx)
